all: build/TrafficSimulator.dll
	@echo Done!

clean:
	rm -f build/*.*
	rm -f build/obj/*.o
	cp ./win32_resources/*.dll ./build/

build/TrafficSimulator.dll: build/obj/TrafficSimulator.o build/obj/controller.o build/obj/database.o build/obj/direction.o build/obj/intersection.o build/obj/model.o build/obj/operators.o build/obj/rectangle.o build/obj/vehicle.o build/obj/zone.o build/obj/view.o build/obj/visualisation.o
	g++ -shared -o build/TrafficSimulator.dll build/obj/*.o -ladam-base -lSDL -lsqlite3
	cp ./build/TrafficSimulator.dll ./TrafficSimulatorGUI/TrafficSimulatorGUI/bin/Debug/

build/obj/TrafficSimulator.o: TrafficSimulator.cpp
	g++ -c TrafficSimulator.cpp -o build/obj/TrafficSimulator.o

build/obj/controller.o: controller/controller.cpp controller/controller.h model/*.h
	g++ -c controller/controller.cpp -o build/obj/controller.o

build/obj/database.o: controller/database.cpp controller/database.h model/*.h
	g++ -c controller/database.cpp -o build/obj/database.o

build/obj/direction.o: model/direction.cpp model/direction.h model/*.h
	g++ -c model/direction.cpp -o build/obj/direction.o

build/obj/intersection.o: model/intersection.cpp model/intersection.h model/*.h
	g++ -c model/intersection.cpp -o build/obj/intersection.o

build/obj/model.o: model/model.cpp model/model.h model/*.h
	g++ -c model/model.cpp -o build/obj/model.o

build/obj/operators.o: model/operators.cpp model/operators.h model/*.h
	g++ -c model/operators.cpp -o build/obj/operators.o

build/obj/rectangle.o: model/rectangle.cpp model/rectangle.h model/*.h
	g++ -c model/rectangle.cpp -o build/obj/rectangle.o

build/obj/vehicle.o: model/vehicle.cpp model/vehicle.h model/*.h
	g++ -c model/vehicle.cpp -o build/obj/vehicle.o

build/obj/zone.o: model/zone.cpp model/zone.h model/*.h
	g++ -c model/zone.cpp -o build/obj/zone.o

build/obj/view.o: view/view.cpp view/view.h model/*.h
	g++ -c view/view.cpp -o build/obj/view.o

build/obj/visualisation.o: view/visualisation.cpp view/visualisation.h model/*.h
	g++ -c view/visualisation.cpp -o build/obj/visualisation.o

